/*
 * @Author: sbotlp
 * @Email: sbotlp@sina.com
 * @Date: 2019-06-29 17:27:14
 * @LastEditTime: 2019-06-30 10:29:51
 * @Description: http://www.sbotlp.com.cn
 */
/* import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import actions from '../actions';
export default connect(
  state => state,
 dispatch => bindActionCreators(actions, dispatch)
) */
import { ComponentClass } from 'react';
import {connect as nativeConnect, MapDispatchToPropsParam, MapStateToPropsParam} from 'react-redux';
export type ComponentDecorator<P = any> = <T extends ComponentClass<P>>(WrappedComponent: T) => T;
export const connect: <P, S = {}>(
  mapState: MapStateToPropsParam<Partial<P>, P, S>,
  mapDispatch?: MapDispatchToPropsParam<Partial<P>, P>
) => ComponentDecorator = nativeConnect as any